package com.maxd.modules.selfshop.prize.respository;


import com.maxd.modules.selfshop.prize.entity.SelfPrizeRule;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SelfPrizeRuleJpaRepository extends JpaRepository<SelfPrizeRule, Long> {

    //条件查询带分页
    Page<SelfPrizeRule> findAll(Specification<SelfPrizeRule> specification, Pageable pageable);

    //条件查询
    List<SelfPrizeRule> findAll(Specification<SelfPrizeRule> specification);

    //查询可用的抽奖
    List<SelfPrizeRule> findAllByStatus(Integer status);

}
